package com.kidback.bbloc259.api.service;


import com.kidback.bbloc259.bean.LocationBean;
import com.kidback.bbloc259.bean.UserInfoBean;
import com.kidback.bbloc259.network.beans.BaseResponse;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface BBService {

    @POST("register")
    Observable<BaseResponse<Void>> register(
            @Query("phone") String phone,
            @Query("password") String password
    );

    @POST("login")
    Observable<BaseResponse<UserInfoBean>> login(
            @Query("phone") String phone,
            @Query("password") String password
    );

    @POST("location/report")
    Observable<BaseResponse<Void>> locationReport(
            @Query("user_id") String user_id,
            @Query("latitude") double latitude,
            @Query("longitude") double longitude,
            @Query("address") String address
    );

    @GET("getLocationList")
    Observable<BaseResponse<List<LocationBean>>> getLocationList(
            @Query("user_id") String user_id,
            @Query("date") String date
    );

    @POST("order/ali")
    Observable<BaseResponse<String>> createAlipayOrder(
            @Query("vip_type") int vipType,
            @Query("unbind_user_id") String unbind_user_id);

}
